package cn.flashk {
	import flash.display.Shape;
	
	import cn.flashk.controls.support.TreeItemRender;

	/**
	 * 树型渲器的实例
	 * @author yu
	 * 
	 */	
	public class CustomTreeRender extends TreeItemRender {
		private var sh:Shape;
		public function CustomTreeRender() {
			super();
			this.graphics.beginFill(0xAAAAAA);
			this.graphics.drawRect(192,7,8,8);
		}
		
		/**
		 * 设置叶的值 
		 * @param value
		 * 
		 */		
		override public function set data(value:Object):void {
			_isNeedSetText = false;
			super.data = value;
			txt.text = ":::  "+value.@label;
			txt.width = txt.textWidth + 5;
		}
		override public function get itemHeight():Number {
			return 24;
		}
		override public function setSize(newWidth:Number, newHeight:Number):void {
			super.setSize(newWidth,newHeight);
		}
	}
}